export const swipeCell = Behavior({
  data: {
    swipeCellQueue: []
  },
  methods: {
    swipeCellOpen(e){
      const instance = this.selectComponent(`#${e.target.id}`)
      this.data.swipeCellQueue.push(instance)
    },
    onSwipeCellPage(){
      this.onSwipeCellCommonClick()
    },
    onSwipeCellClick(){
      this.onSwipeCellCommonClick()
    },
    onSwipeCellCommonClick(){
      this.data.swipeCellQueue.forEach( instance => {
        instance.close()
      })
      this.data.swipeCellQueue = []
    },
  }
})